package com.cls.business.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cls.business.entity.Notice;
import com.cls.business.vo.NoticePageVO;
import com.cls.common.entity.QueryRequest;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * 通知公告 Service接口
 *
 * @author weimaomao
 * @date 2020-11-10 09:36:03
 */
public interface INoticeService extends IService<Notice> {
    /**
     * 查询（分页）
     *
     * @param request QueryRequest
     * @param notice notice
     * @return PageInfo<Notice>
     */
    PageInfo<Notice> findNotices(QueryRequest request, Notice notice);

    PageInfo<Notice> findNotices(QueryRequest request,LambdaQueryWrapper<Notice> queryWrapper );

    /**
     * 查询（所有）
     *
     * @param notice notice
     * @return List<Notice>
     */
    List<Notice> findNotices(Notice notice);

    List<Notice> findNotices(LambdaQueryWrapper<Notice> queryWrapper);

    List<Notice> findKTZJValidNotices();

    /**
     * 修改
     *
     * @param notice notice
     */
    void updateNotice(Notice notice);

    /**
     * 删除
     *
     * @param notice notice
     */
    void deleteNotice(Notice notice);

    /**
     * 删除
     * @param ids
     */
    void deleteNotices(String[] ids);

    /**
     * 更新发布状态
     *
     * @param
     */
    void updateNoticePublish(Long noticeId, Boolean isPublish);

    NoticePageVO getOneHaveNextLast(Long noticeId);
}
